Known systems adjust white balance for expressing a white color in an image obtained by imaging under variable lighting conditions, including ambient lighting or camera flash. Differences in a color temperature of a subject due to different light sources are adjusted so that each image naturally expresses a proper color tone adaptively with respect to each light source, by adjusting the white balance. This function is called an auto white balance (AWB) function.
Known systems calculate a final WB coefficient value (hereinafter, final WB coefficient value) in response to a flash ratio representing a contribution of the flash to a pixel luminance value based on a white balance coefficient value (hereinafter, preliminary WB coefficient value) calculated by the AWB function. The known system, obtains a preliminary WB coefficient value of an image for just the ambient light without using the flash (hereinafter, non-flash image). In addition, a preliminary WB coefficient value is obtained for just the flash without the ambient light based on a device specification or a real measured value.
A known system calculates a flash ratio by comparing pixels corresponding to a non-flash image and an image photographed by emitting the flash (hereinafter, flash image). When hand vibration or a change in ambient lighting, for example, occurs, pixel luminance corresponding to the flash image and the non-flash image may vary resulting in an inaccurate flash ratio.
A known system applies a low-pass filter (LPF) to the flash ratio for every pixel including pixels with abnormal flash ratio values due to hand vibration or change in ambient lighting, for example. Thereby, the flash ratio is adjusted to change gradually and rapid changes in the flash ratio over the whole image are suppressed.
A final WB coefficient value is calculated using the gradually adjusting flash ratio corresponding to a contribution of the flash exhibiting smooth change in the final WB coefficient value between pixels. When this final WB coefficient value is used in white balance adjustment, a pixel position disturbance (out of color registration) resulting from use of a flash ratio that changes abruptly between pixels is suppressed. The known system calculates an inaccurate abnormally high or low flash ratio that fails to compensate for abrupt changes in flash ratio resulting in pixel position disturbance in an image. A system according to invention principles addresses these deficiencies and related problems.